package com.optimus.model.mapped;

import java.io.Serializable;

/**
 * 
 * @author Optimus
 * 
 */
public class CustomerBean implements Serializable
{

	private static final long serialVersionUID = 1L;
	private int id;
	private String fullname;
	private String username;
	private String password;
	private String email;
	private boolean isAdmin;

	/**
	 * An Empty Constructor
	 */
	public CustomerBean()
	{}

	/**
	 * @param id
	 *            - customer id
	 * @param fullname
	 *            - customer's full name
	 * @param username
	 *            - customer's username
	 * @param password
	 *            - customer's password
	 * @param email
	 *            - customer's email address
	 * @param isAdmin
	 *            - defines whether a specific user is an admin user
	 */
	public CustomerBean(int id, String fullname, String username, String password, String email,
			boolean isAdmin)
	{
		this.id = id;
		this.fullname = fullname;
		this.username = username;
		this.password = password;
		this.email = email;
		this.isAdmin = isAdmin;
	}

	public static CustomerBean createCasualCustomer()
	{
		return new CustomerBean(999, "casual", "casual", "casual", "casual", false);
	}

	/**
	 * @return the id
	 */
	public int getId()
	{
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(int id)
	{
		this.id = id;
	}

	/**
	 * @return the fullname
	 */
	public String getFullname()
	{
		return fullname;
	}

	/**
	 * @param fullname
	 *            the fullname to set
	 */
	public void setFullname(String fullname)
	{
		this.fullname = fullname;
	}

	/**
	 * @return the username
	 */
	public String getUsername()
	{
		return username;
	}

	/**
	 * @param username
	 *            the username to set
	 */
	public void setUsername(String username)
	{
		this.username = username;
	}

	/**
	 * @return the password
	 */
	public String getPassword()
	{
		return password;
	}

	/**
	 * @param password
	 *            the password to set
	 */
	public void setPassword(String password)
	{
		this.password = password;
	}

	/**
	 * @return the email
	 */
	public String getEmail()
	{
		return email;
	}

	/**
	 * @param email
	 *            the email to set
	 */
	public void setEmail(String email)
	{
		this.email = email;
	}

	/**
	 * @return the isAdmin
	 */
	public boolean isAdmin()
	{
		return isAdmin;
	}

	/**
	 * @param isAdmin
	 *            the isAdmin to set
	 */
	public void setAdmin(boolean isAdmin)
	{
		this.isAdmin = isAdmin;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString()
	{
		return id + " " + fullname + " " + username + " " + password + " " + email;
	}

}
